﻿using RecruitStudents.Client.BLL;
using RecruitStudents.Utility;
using RecruitStudents.Utility.Const;
using RecruitStudents.Utility.Helper;
using RecruitStudents.Utility.Json;
using RecruitStudents.Utility.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace RecruitStudents.Client.Base
{
    public partial class Base_Pad_ExamScoreHisSetting_List : BaseForm
    {
        ServiceBase service = new ServiceBase();
        ServiceComm bllCommService = new ServiceComm();
        public Base_Pad_ExamScoreHisSetting_List()
        {
            InitializeComponent();
            using (DataTable dt = bllCommService.GetSystemInfoDataTable(ConstSystem.SystemPadHisQueryShowType))
            {
                if (dt != null && dt.Rows.Count > 0)
                {
                    radioGroup1.EditValue = dt.Rows[0]["SystemInfoName"].ToSafeString();
                }
                else
                {
                    radioGroup1.EditValue = "0";
                }
            }
        }


        private void btnAdd_Click(object sender, EventArgs e)
        {
            List<TB_Sys_SystemInfo> list = new List<TB_Sys_SystemInfo>();
            list.Add(new TB_Sys_SystemInfo() { SystemInfoName = radioGroup1.EditValue.ToSafeString(), SystemInfoID = ConstSystem.SystemPadHisQueryShowType, SystemInfoRemark = " Pad评分历史查询展现方式配置(0照片墙,1分组展示)" });
            if (bllCommService.SaveSystemInfo(list))
            {
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}

